Problem diagnosis technique of memory corruption based on regular expression generated during application compiling

ABSTRACT

According to one embodiment, a method, computer system, and computer program product for memory corruption diagnosis is provided. The present invention may include generating a pattern expression (PE) header file, wherein a plurality of common datatypes associated with a software program are pre-defined. The invention may further include generating a PE for each of the plurality of common datatypes, and generating a PE table by merging the generated PEs for each of the plurality of common datatypes. Upon discovery that memory corruption has occurred, the invention may include transmitting a recorded state of the software program as a core dump file to a server, and using a dump utility to identify overlay content of the core dump file. Lastly, the invention may include identifying a possible source program of the memory corruption by matching the PE tables against the illegally-written overlay content.

BACKGROUND

The present invention relates, generally, to the field of computing, andmore particularly to the field of memory corruption diagnosis.

Memory, namely primary storage memory, allows computer processors tostore instructions to be read and executed, and its integrity isessential to the operation of any modern computing technology. Memorymay become corrupted when it is unintentionally modified as a result ofprogramming errors, thereby breaking the continuity of the storedinstructions. Memory corruption can occur when a program writes into anillegal or invalid memory block. Any program that subsequently attemptsto read from the corrupted memory blocks will either crash or behave ina bizarre fashion.

SUMMARY

According to one embodiment, a method, computer system, and computerprogram product for memory corruption diagnosis is provided. The presentinvention may include generating a pattern expression (PE) header file,wherein the common datatypes associated with a software program arepre-defined, and modifying the software program to both include the PEheader file and to add an annotation symbol to selected common datatypesof the software program. The invention may also include generating a PEfor each of the common datatypes based on the modified software program,and generating a PE table by merging the generated PE for each of thecommon datatypes. Upon discovery that memory corruption has occurred,the invention may include transmitting a recorded state of the softwareprogram as a core dump file to a server, and using a dump utility toidentify overlay content of the core dump file. The invention mayfurther include converting the identified overlay content to ahuman-readable value. Lastly, the invention may include identifying apossible source program of the memory corruption by matching each PEstored in the generated table for each of the common datatypes againstthe illegally written data in the converted overlay content.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

These and other objects, features and advantages of the presentinvention will become apparent from the following detailed descriptionof illustrative embodiments thereof, which is to be read in connectionwith the accompanying drawings. The various features of the drawings arenot to scale as the illustrations are for clarity in facilitating oneskilled in the art in understanding the invention in conjunction withthe detailed description. In the drawings:

FIG. 1 illustrates an exemplary networked computer environment accordingto at least one embodiment;

FIG. 2 is an operational flowchart illustrating a memory corruptiondetection process according to at least one embodiment;

FIG. 3 is an operational flowchart illustrating the workflow of a memorycorruption detection process in a software development and informationtechnology operations (DevOps) environment according to at least oneembodiment;

FIG. 4 is a block diagram of internal and external components ofcomputers and servers depicted in FIG. 1 according to at least oneembodiment;

FIG. 5 depicts a cloud computing environment according to an embodimentof the present invention; and

FIG. 6 depicts abstraction model layers according to an embodiment ofthe present invention.

DETAILED DESCRIPTION

Detailed embodiments of the claimed structures and methods are disclosedherein; however, it can be understood that the disclosed embodiments aremerely illustrative of the claimed structures and methods that may beembodied in various forms. This invention may, however, be embodied inmany different forms and should not be construed as limited to theexemplary embodiments set forth herein. In the description, details ofwell-known features and techniques may be omitted to avoid unnecessarilyobscuring the presented embodiments.

Embodiments of the present invention relate, generally, to the field ofcomputing, and more particularly to the field of memory corruptiondiagnosis in computing devices. The following described exemplaryembodiments provide a system, method, and program product to, amongother things, identify the location of memory corruption and identifythe program responsible by comparing crash data against data recordedwhen the program compiled. Therefore, the present embodiment has thecapacity to improve the technical field of memory corruption diagnosisby introducing a method of memory diagnosis that may not impose anyadditional performance overhead, may analyze and diagnose the corruptionautonomously instead of requiring the software programmer to identifyoverlay content manually, and may provide coverage of both the headerand data sections of each memory block.

As previously described, memory allows computer processors to storeinstructions to be read and executed, and its integrity is essential tothe operation of any modern computing technology. Memory may becomecorrupted when it is unintentionally modified as a result of programmingerrors, thereby breaking the continuity of the stored instructions.Memory corruption can occur when a program writes into an illegal orinvalid memory block, and happens through a variety of mechanisms; forexample, by programs overwriting beyond the bounds of the memory blockallocated to them, writing to an uninitialized pointer, writing to apointer that previously pointed to a memory block but has beendeallocated, and other misuses of pointers. Once memory corruptionoccurs, data can be lost and program contents can be modified, resultingin further performance degradation, a system crash, or otherunpredictable undesirable behavior. Memory corruption is notoriouslydifficult to diagnose since the corruption could be from any code, andthe effect of the corruption does not manifest until well after thecorruption occurred. Furthermore, effects appear under unusualconditions, making reproduction of the error difficult.

A variety of techniques exist in the art which attempt to address thememory corruption issue in different ways, and these fall into twogeneral methods. The first method attempts to use debugger programs toactively monitor the system's memory for signs of memory corruptionduring runtime. Some debuggers go about this by attempting to detectmemory corruption at the time when the memory is being released, or relyon periodic evaluation of the memory block. Another common debuggingtechnique is to monitor specific memory locations and break theexecution of the program when the memory is changed. This is also knownas a “watchpoint” or “breakpoint” technique.

The second general method of memory corruption diagnosis is to waituntil an error has occurred potentially as a result of memory corruptionand examine the memory dump for evidence of memory corruption. If theoffending code could be spotted by analyzing the dump that was producedwhen the error was detected, the need to run with a debugger isobviated. One of the more common methods of analyzing the dump is tolocate the corrupted memory, and let the software programmer examine theoverlay content and try to determine where the data may have originated.

However, all of these techniques come with significant drawbacks thatimpair their effectiveness at diagnosing memory corruption. The firstgeneral method calls for active monitoring of the system's memory, whichimposes a performance overhead on the system. Furthermore, those methodsthat attempt to diagnose memory corruption at the time when the memoryis being released suffer from the problem that the offending code couldhave been overwritten by the time of the scan. Those debug techniquesthat rely on periodic evaluation of the memory block frequently performevaluations on header sections and omit data sections; as a result,corruption of data sections can be missed. Lastly, the “watchpoint” or“breakpoint” debug technique involves the monitoring of a specificmemory location which may be legitimately used many times beforebecoming corrupted, since memory is often reused. As a result, the wholesystem may suffer particularly significant performance decline from thedebug overhead; most users could not afford to run with this kind ofdebugger.

Regarding the second approach of evaluating error reports for diagnosingmemory corruption, the current standard of tasking the softwareprogrammer with examining the data is flawed in that the process can bedifficult, time consuming, and, even worse, inconclusive, since thisapproach relies heavily on the skill and knowledge of the applicationstaff.

Thus, it is desirable to have a more effective and efficient way toidentify the source of a memory corruption event. As such, it may beadvantageous to, among other things, implement a system that does notimpose any additional performance overhead, identifies the offendingcode before it is overwritten, analyzes and diagnoses the corruptionautonomously instead of requiring the software programmer to identifyoverlay content manually, and provides coverage of both the header anddata sections of each memory block.

According to one embodiment, the invention is a method that may equipthe compiler with a new layer which may generate a pattern expression(PE) on each datatype of the software program when the software programis compiled. Next, the PEs that associate with each datatype of thesoftware program may be stored in a library as tables. When memorycorruption is identified, overlay content from the generated dump filemay be matched against the PE tables to identify the possible sourceprogram of the corruption.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general-purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The following described exemplary embodiments provide a system, method,and program product to compare an application's error reports againstdata gathered when the application was compiled in order to diagnosememory corruption.

Referring to FIG. 1, an exemplary networked computer environment 100 isdepicted, according to at least one embodiment. The networked computerenvironment 100 may include build server 102 and production server 120interconnected via a communication network 116. According to at leastone implementation, the networked computer environment 100 may include aplurality of build servers 102 and production servers 120, of which onlyone of each is shown for illustrative brevity.

The communication network 116 may include various types of communicationnetworks, such as a wide area network (WAN), local area network (LAN), atelecommunication network, a wireless network, a public switched networkand/or a satellite network. The communication network 116 may includeconnections, such as wire, wireless communication links, or fiber opticcables. It may be appreciated that FIG. 1 provides only an illustrationof one implementation and does not imply any limitations with regard tothe environments in which different embodiments may be implemented. Manymodifications to the depicted environments may be made based on designand implementation requirements.

Build server 102 may include a compiler 112 equipped with a patternexpression layer 114, a data storage device 104 that is enabled to hostand compile a software program 108, and a database 110A, and communicatewith the production server 120 via the communication network 116, inaccordance with one embodiment of the invention. Build server 102 maybe, for example, a mobile device, a telephone, a personal digitalassistant, a netbook, a laptop computer, a tablet computer, a desktopcomputer, or any type of computing device capable of hosting and runninga program and accessing a network. As will be discussed with referenceto FIG. 4 the build server 102 may include internal components 402 a andexternal components 404 a, respectively. The build server 102 may alsooperate in a cloud computing service model, such as Software as aService (SaaS), Platform as a Service (PaaS), or Infrastructure as aService (IaaS). The build server 102 may also be located in a cloudcomputing deployment model, such as a private cloud, community cloud,public cloud, or hybrid cloud.

The production server 120 may be a laptop computer, netbook computer,personal computer (PC), a desktop computer, or any programmableelectronic device or any network of programmable electronic devicescapable of hosting and running a dump utility 106 and a database 110Band communicating with the build server 102 via the communicationnetwork 116, in accordance with embodiments of the invention. As will bediscussed with reference to FIG. 4 the production server computer 120may include internal components 402 b and external components 404 b,respectively. The production server 120 may also operate in a cloudcomputing service model, such as Software as a Service (SaaS), Platformas a Service (PaaS), or Infrastructure as a Service (IaaS). Theproduction server 120 may also be located in a cloud computingdeployment model, such as a private cloud, community cloud, publiccloud, or hybrid cloud.

The compiler 112 is a known computer program capable of transformingsource code written in a human-readable programming language, such asC++, Python® (Python® and all Python® based trademarks and logos aretrademarks or registered trademarks of the Python Software Foundationand/or its affiliates), Java® (Java® and all Java® based trademarks andlogos are trademarks or registered trademarks of Oracle Corporationand/or its affiliates), etc., into a computer-readable machine languageto create a program that can be executed by the computer. According tothe present embodiment, the pattern expression layer 114 may be anadditional layer of the compiler 112 capable of converting the datatypesof software program 108 into tables of regular expressions, which arestored in a repository, such as database 110A, 110B.

According to the present embodiment, the dump utility 106 may be acomputer program capable of evaluating the overlays of memory dumpsperformed upon detection of a fatal error, and comparing this dataagainst the tables of regular expressions generated by PatternExpression Layer 114 and stored in the database 110A, 110B to diagnosememory corruption. The memory corruption diagnostic method is explainedin further detail below with respect to FIG. 2.

Referring now to FIG. 2, an operational flowchart illustrating a memorycorruption diagnostic process 200 is depicted according to at least oneembodiment. At 202, the PE layer 114 creates a PE header file, withinwhich the PE is pre-defined for each of the common datatypes that areused by software program 108. Pre-definition entails defining themathematical process that will be employed to convert the commondatatypes of software program 108 into PEs, and storing this process inthe PE header file. As an example, common datatypes char and string maybe pre-defined to use regular expressions to present their pattern;numerical datatypes like int, long, float, etc. may be pre-defined toeither use the corresponding numerical value as the PE criteria, or useregular expressions and convert the numerical datatypes to the char typebefore comparing each with the regular expressions.

Then, at 204, the software program 108 is modified to incorporate thepre-defined PE header file, and to indicate which datatype in softwareprogram 108 will be converted to the pre-defined PEs. In one embodiment,the process may involve adding an annotation symbol (i.e. /@) to thedatatype definition where the PE layer will use the pre-defined PEs.When compiling the software program, the compiler may parse theseannotations according to the PE header file, and translate the sourcecode into a PE table. An example of a software program, Library.h,incorporating the PE header file and with annotated datatypes may appearas follows:

Library.h #include<PE.h> enum gender{male=1,female}; structureCustomerInfo{ char CardID[16]; /@CardID gender gGender; int iChannelID;/@ChannelID char PhoneNum[12]; /@Phone char address[32]; char mail[32];/@Mail }

In this example, the PE header file, PE.h, is incorporated by referenceinto the software program via the line #include<PE.h>. Furthermore, theCardID, iChannelID, PhoneNum, and mail datatypes of the software programare selected to be included in the PE file, and are therefore annotatedwith the /@ symbol. The gender and address datatypes are not selected,and are therefore not appended.

Next, at 206, each annotated datatype of software program 108 may beconverted by the compiler 112 into a PE, which may contain a link to thesoftware program 108. These PEs may be merged together into PE tables,and stored in a library which may be accessible to the production server120. The PE table for the sample pre-defined PE structure from theprevious example may appear as follows:

PE Table for structure customerInfo: Data Offset Annotation DatatypeLength/Byte PE 0 CardID char 16 RE:6226\d{12} 18 ChannelID int 2Integer: [0, 3] 20 PhoneNum char 12 RE: 1[3|4|5|7|8]\d{9} 64 mail char32 RE: \w*@\w*.\w*

Then, at 208, when a fatal error occurs as a potential result of memorycorruption, the recorded state of the software program 108 in workingmemory is then recorded in a core dump file which is stored in database110B of production server 120. Fatal errors may occur when a program hasreached a point where it can no longer continue running, and standarddebugging practice may be to dump the entire state of the program at thetime of the error into secondary memory to assist with debugging.

Next, at 210, the dump utility 106 identifies the overlay content of thecore dump file. The overlay content may be known technology where apiece of storage is overwritten (or overlaid) by segments of otherprograms without the permission of the storage owner. For example, whereprogram A owns a continuous 256 byte section of storage to store itsinformation from address x‘01000000’ to x‘01000100, and program B uses awrong pointer (x‘01000080’) to write its own data into the storage ownedby program A, the data written by program B may be considered ‘overlaycontent.’ One method of identifying overlay content may include the useof a front check zone and a back check zone to mark the owner of anygiven block of storage. The overlay content of the dump may appear asfollows:

+0 36323236 31323334 30303636 31323334 +16 00010002 31333930 3130323132333420 +32 097F6E32 1E642F12 143A506C 324F344A +48 293E4A5F 564E365D3E4E102D 72314E6C +64 6578616D 706C6540 6578616D 706C652E +80 636F6D2020202020 20202020 20202020Here, the overlay content is written in hexadecimal and, as the exampledemonstrates, is unreadable by a human. Therefore, the hexadecimaloverlay content must be converted back to a human-readable language forease of troubleshooting and to facilitate matching against the PEtables.

Then, at 212, the dump utility 106 converts the overlay content of thecore dump file to the original human-readable values through the use ofthe PE tables stored in the library, as well as the codepage of softwareprogram 108. As an example, the data presented in step 212 may beconverted to the following table according to the customerInfo PE tableillustrated in step 206:

Offset Length Datatype Translated Content PE 0 16 char 6226123400661234RE: 6226\d{12} 18 2 int 2 Integer: [0, 3] 20 12 char 13901021234 RE:1[3|4|5|7|8]\d{9} 64 32 char example@example. RE: com \w*@\w*.\w*

Next, at 214, the dump utility 106 identifies the possible sourceprogram of the corruption, which may be software program 108, bymatching the data illegally written into the corrupted memory againstthe data recorded in the PE tables. As an example, program A may use awild pointer to write its data, consisting in this example of an emailaddress, into storage belonging to program B, which may not have anyvariable or data related to email addresses. The ‘criminal’ program(i.e., program A) may be difficult to locate since there is no directpointer to program A. However, dump utility 106 may locate the criminalprogram by searching the PE tables to identify which compiled programsthe email address type data originated from.

FIG. 3 is an operational flowchart illustrating the workflow in asoftware development and information technology operations (DevOps)environment. The developer 330 may be tasked with writing source code aswell as the PE header file, PE.h, within the Integrated DevelopmentEnvironment (IDE) 302. Once the developer 330 completes and unit-teststhe code, at 314, the developer 336 may commit the completed source codeto the source control manager (SCM) 304. The SCM 304 is a softwareutility that manages changes to computer programs, tracking revisionsand allowing access to earlier versions of the program. The buildengineer 332 provides scripts to build the source code into real binarymodules. At 316, the build engineer may place each build into a buildrepository 306. The build repository 306 is a storage location fromwhich completed software packages (or ‘builds’) can be retrieved andinstalled on a computing device. At 318, the PE tables may be generatedfrom PE.h when each build is placed into a build repository and storedin the SCM. At 320, the release engineer 334 may then retrieve thecompleted application and the PE tables from the build repository 306and deploy them to the application server 308 for execution. At 322 whena detected problem 310 is experienced, the dump utility 106 may scan theoverlay content to identify the suspect program 312 that associates withthe PE. At 324, a notification may be sent to the SCM 304. At 326, theSCM 304 may then provide some functions to notify the developer 330 ofthe suspect program 312 so that the developer 330 can verify whether theidentified memory corruption is a bug. The operation engineer 336 maymaintain the systems, troubleshoot problems, and evaluate memory dumps.The operation engineer 336 may also oversee the detection of problemsand the operation of the dump utility 106.

It may be appreciated that FIGS. 2 and 3 provide only an illustration ofone implementation and do not imply any limitations with regard to howdifferent embodiments may be implemented. Many modifications to thedepicted environments may be made based on design and implementationrequirements.

FIG. 4 is a block diagram 400 of internal and external components of thebuild server 102 and the production server 120 depicted in FIG. 1 inaccordance with an embodiment of the present invention. It should beappreciated that FIG. 4 provides only an illustration of oneimplementation and does not imply any limitations with regard to theenvironments in which different embodiments may be implemented. Manymodifications to the depicted environments may be made based on designand implementation requirements.

The data processing system 402, 404 is representative of any electronicdevice capable of executing machine-readable program instructions. Thedata processing system 402, 404 may be representative of a smart phone,a computer system, PDA, or other electronic devices. Examples ofcomputing systems, environments, and/or configurations that mayrepresented by the data processing system 402, 404 include, but are notlimited to, personal computer systems, server computer systems, thinclients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, network PCs, minicomputersystems, and distributed cloud computing environments that include anyof the above systems or devices.

The build server 102 and the production server 120 may includerespective sets of internal components 402 a,b and external components404 a,b illustrated in FIG. 3. Each of the sets of internal components402 include one or more processors 420, one or more computer-readableRAMs 422, and one or more computer-readable ROMs 424 on one or morebuses 426, and one or more operating systems 428 and one or morecomputer-readable tangible storage devices 430. The one or moreoperating systems 428, the software program 108 and the compiler 112 inthe build server 102, and the dump utility 106 in the production server120 are stored on one or more of the respective computer-readabletangible storage devices 430 for execution by one or more of therespective processors 420 via one or more of the respective RAMs 422(which typically include cache memory). In the embodiment illustrated inFIG. 4, each of the computer-readable tangible storage devices 430 is amagnetic disk storage device of an internal hard drive. Alternatively,each of the computer-readable tangible storage devices 430 is asemiconductor storage device such as ROM 424, EPROM, flash memory or anyother computer-readable tangible storage device that can store acomputer program and digital information.

Each set of internal components 402 a,b also includes a R/W drive orinterface 432 to read from and write to one or more portablecomputer-readable tangible storage devices 438 such as a CD-ROM, DVD,memory stick, magnetic tape, magnetic disk, optical disk orsemiconductor storage device. A software program 108 can be stored onone or more of the respective portable computer-readable tangiblestorage devices 438, read via the respective R/W drive or interface 432,and loaded into the respective hard drive 430.

Each set of internal components 402 a,b also includes network adaptersor interfaces 436 such as a TCP/IP adapter cards, wireless Wi-Fiinterface cards, or 3G or 4G wireless interface cards or other wired orwireless communication links. The software program 108 in the buildserver 102 and the dump utility 106 in the production server 120 can bedownloaded to the build server 102 and the production server 120 from anexternal computer via a network (for example, the Internet, a local areanetwork or other, wide area network) and respective network adapters orinterfaces 436. From the network adapters or interfaces 436, thesoftware program 108 in the build server 102 and the dump utility 106 inthe production server 120 are loaded into the respective hard drive 430.The network may comprise copper wires, optical fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers.

Each of the sets of external components 404 a,b can include a computerdisplay monitor 444, a keyboard 442, and a computer mouse 434. Externalcomponents 404 a,b can also include touch screens, virtual keyboards,touch pads, pointing devices, and other human interface devices. Each ofthe sets of internal components 402 a,b also includes device drivers 440to interface to computer display monitor 444, keyboard 442, and computermouse 434. The device drivers 440, R/W drive or interface 432, andnetwork adapter or interface 436 comprise hardware and software (storedin storage device 430 and/or ROM 424).

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 5, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment 50 comprises one or morecloud computing nodes 100 with which local computing devices used bycloud consumers, such as, for example, personal digital assistant (PDA)or cellular telephone 54A, desktop computer 54B, laptop computer 54C,and/or automobile computer system 54N may communicate. Nodes 100 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 54A-N shownin FIG. 5 are intended to be illustrative only and that computing nodes100 and cloud computing environment 50 can communicate with any type ofcomputerized device over any type of network and/or network addressableconnection (e.g., using a web browser).

Referring now to FIG. 6, a set of functional abstraction layers 600provided by cloud computing environment 50 is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 6 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include: mainframes 61; RISC(Reduced Instruction Set Computer) architecture based servers 62;servers 63; blade servers 64; storage devices 65; and networks andnetworking components 66. In some embodiments, software componentsinclude network application server software 67 and database software 68.

Virtualization layer 70 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers71; virtual storage 72; virtual networks 73, including virtual privatenetworks; virtual applications and operating systems 74; and virtualclients 75.

In one example, management layer 80 may provide the functions describedbelow. Resource provisioning 81 provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricing 82provide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal 83 provides access to the cloud computing environment forconsumers and system administrators. Service level management 84provides cloud computing resource allocation and management such thatrequired service levels are met. Service Level Agreement (SLA) planningand fulfillment 85 provides pre-arrangement for, and procurement of,cloud computing resources for which a future requirement is anticipatedin accordance with an SLA.

Workloads layer 90 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation 91; software development and lifecycle management 92; virtualclassroom education delivery 93; data analytics processing 94;transaction processing 95; and memory corruption diagnosis 96. Memorycorruption diagnosis 96 may relate to evaluating the overlays of memorydumps performed upon detection of a fatal error, and comparing this dataagainst the tables of regular expressions generated by patternexpression layer 114 and stored in database 110A, 110B to diagnosememory corruption.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A processor-implemented method for memorycorruption diagnosis, the method comprising: generating a patternexpression (PE) header file, wherein a plurality of common datatypesassociated with a software program are pre-defined; modifying thesoftware program to include the PE header file; modifying the softwareprogram to add an annotation symbol of a plurality of annotation symbolsto a common datatype of the plurality of common datatypes; generating aPE for each of the plurality of common datatypes based on the modifiedsoftware program; generating a PE table by merging the generated PE foreach of the plurality of common datatypes; on determining that a memorycorruption has occurred, transmitting a recorded state of the softwareprogram in a working memory storage as a core dump file to a server;identifying, by a dump utility, overlay content of the core dump file;converting, by the dump utility, the identified overlay content to ahuman-readable value, and; identifying a possible source program of thememory corruption by matching each PE stored in the generated table foreach of the plurality of common datatypes against illegally written datain the converted overlay content.
 2. The method of claim 1, wherein thetable represents a char datatype and a string datatype of the softwareprogram as a plurality of regular expressions.
 3. The method of claim 1,wherein the table represents an int datatype, a long datatype, and afloat datatype of the software program as a plurality of numericalvalues.
 4. The method of claim 1, wherein the table represents an intdatatype, a long datatype, and a float datatype of the software programas regular expressions.
 5. The method of claim 1, wherein a PE for eachof the plurality of common datatypes is generated by a compiler.
 6. Themethod of claim 1, wherein the core dump file is transmitted to aproduction server.
 7. The method of claim 1, wherein the method isimplemented on a computing device using a programming language selectedfrom a group consisting of C, COBOL, Python®, C++, and C#.